- content_for :title, "Category: #{@category.name}"

.hero
  section.section: .container
    .pull-right
      a.button.is-light href=@category.catalog_edit_url
        span.icon: i.fa.fa-edit
        span Edit this category
    p.heading= link_to "Category", categories_path
    h2
      a href=category_path(@category)
        = @category.name
    p.subtitle
      - if @category.description.present?
        = @category.description
      - else
        em This category does not have a description yet. You can <strong><a href="#{@category.catalog_edit_url}">add one on github</a></strong>!

    - if current_order.default_direction?
      = bar_chart @category.projects.first(6).map {|p| [p.permalink, p.score]}.to_h, small: true

section.section: .container
  .level
    .level-left
    .level-right
      .level-item= project_display_picker @display_mode
      .level-item= project_order_dropdown current_order

  = render "projects/listing", projects: @category.projects, show_categories: false, display_mode: @display_mode
